package ch03;

import ch03.inputdecorator.LowerCaseInputStream;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

/**
 * Created by lenovo on 2017/11/12.
 */
public class InputTest {
    public static void main(String[] args) {

        try {
            int c;
            InputStream in = new LowerCaseInputStream(
                    new BufferedInputStream(
                            new FileInputStream("C:\\Users\\lenovo\\Desktop\\test.txt")));
            while ((c=in.read())>=0){
                System.out.println(c);
            }
            in.close();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
